import React from 'react';
import {Carousel, Card} from 'antd';
import './style.less';

export default class Carousels extends React.Component {
    render() {
        return (
            <div className="wrap">
                <Card title="文字背景轮播">
                    <Carousel>
                        <div><h3>Hello</h3></div>
                        <div><h3>Old</h3></div>
                        <div><h3>铁</h3></div>
                    </Carousel>
                </Card>
                <Card title="图片背景轮播" style={{marginTop:20}} className="slider-wrap">
                    <Carousel>
                        <div>
                            <img style={{width:'100%'}} src="/carousel-img/carousel-1.jpg" alt="这是一张图片"/>
                        </div>
                        <div>
                            <img style={{width:'100%'}} src="/carousel-img/carousel-2.jpg" alt="这是一张图片"/>
                        </div>
                        <div>
                            <img style={{width:'100%'}} src="/carousel-img/carousel-3.jpg" alt="这是一张图片"/>
                        </div>
                    </Carousel>
                </Card>
            </div>
        )
    }
}
